package cn.netjava.chapter7;

import java.io.*;

public class FileInputTest {
	
	public void stringClassTest()throws IOException{
		FileInputStream fis = new FileInputStream("bakFile.java");
		
		InputStreamReader isr = new InputStreamReader(fis,"GB2312");
		
		BufferedReader br = new BufferedReader(isr);
	
		StringBuilder sb = new StringBuilder();

		String s;
		
		while((s=br.readLine())!=null)
		{
			sb.append("\r\n"+s);
		}
		System.out.println(sb);
	}
	
	static public void main(String[] args)throws IOException{
		FileInputTest fit = new FileInputTest();
		
		fit.stringClassTest();
	}

}
